<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    
	
	<title>_发货任务</title>
	<script type="text/javascript">
	        
    </script>
</head>

<body>

	<c:if test="${not empty message}">
		<div id="message" class="alert alert-success"><button data-dismiss="alert" class="close">×</button>${message}</div>
	</c:if>
	
	<div style="height: 10px;"></div>
	
	<div class="row">
		<div class="span12" style="margin-left: 20px;">
			<form class="form-search" id="queryForm" action="${ctx}/delivery" method="post">
			
				<label style="margin-left:10px;">调出仓库：</label> 
				<select  name="_areagroupCode"  id="_areagroupCode" value="${_areagroupCode}"  class="input-medium">
					<option value=""></option>
					<c:forEach items="${areagroupList}" var="areagroup">
						<option value="${areagroup.groupCode}"
						<c:if test="${_areagroupCode eq areagroup.groupCode}">selected=selected</c:if>
						>${areagroup.groupName}</option>
					</c:forEach>
				</select>
				
				<label style="margin-left:10px;">发货状态：</label> 
				<select  name="_status"  id="_statusFlag" value="${_status}" class="input-medium">
					<option value="all"></option>
					    <option value="1"  <c:if test="${_status eq '1'}">selected=selected</c:if>>待发货</option>
						<option value="2" <c:if test="${_status eq '2'}">selected=selected</c:if>>已发货</option>
				</select>
				
			    <button id="query_btn" type="submit" class="btn" style="margin-left: 10px;">搜索</button>
		    </form>
	    </div>
	</div>
	
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
	    <thead>
			<th style="vertical-align: middle; color: white;" colspan="9" bgcolor="#8EB4CB">打包出货任务</th>
		</thead>
		<thead><tr>
		    <th style="width: 150px;">出库单号</th>
		    <th style="width: 150px;">调拨单号</th>
		    <th style="width: 100px;">出库网点</th>
		    <th style="width: 100px;">目的地</th>
		    <th style="width: 100px;">箱子数量</th>
		    <th style="width: 150px;">sku数量</th>
			<th style="width: 100px;">商品数量</th>
			<th style="width: 100px;">当前状态</th>
			<th >操作</th>
		</tr></thead>
		<tbody>
		<c:forEach items="${billList}" var="bill">
			<tr>
			    <td>${bill.billCode}</td>
			    <td>${bill.aboutCode}</td>
			    <td>${bill.areagroup.groupName}</td>
			    <td>${bill.desName}</td>
			    <td>${bill.boxNum}</td>
			    <td>${bill.skuNum}</td>
			    <td>${bill.goodsNum}</td>
			    <td>
			      <c:if test="${bill.status eq '1'}">未打包</c:if>
			      <c:if test="${bill.status eq '2'}">已打包</c:if>
			      <c:if test="${bill.status eq '3'}">已发货</c:if>
			    </td>
				<td>
				   <c:if test="${bill.status eq '2'}">
				      <a href="${ctx}/delivery/toDelivery/${bill.id}" class="btn btn-info ">发货</a>
				   </c:if>
				   
				   <c:if test="${bill.status ne '2'}">
				      <input type="button"  disabled="disabled"  class="btn" value="发货"/>
				   </c:if>
				   
				</td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	
</body>
</html>
